package mx.kolobok.noteeditor;

import mx.kolobok.noteeditor.ui.MainWindow;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;

import javax.swing.*;

/**
 * Created by IntelliJ IDEA.
 * User: Nikita Belenkiy
 * Date: 28.01.11
 * Time: 22:59
 */
public class Main {

    private static final Logger logger = Logger.getLogger(Main.class);

    public static void main(String[] args)  {

        BasicConfigurator.configure();
        SwingUtilities.invokeLater(new Runnable() {
         public void run() {
             JFrame.setDefaultLookAndFeelDecorated(true);
        JDialog.setDefaultLookAndFeelDecorated(true);
        UIManager.LookAndFeelInfo[] installedLookAndFeels = UIManager.getInstalledLookAndFeels();
        for (UIManager.LookAndFeelInfo installedLookAndFeel : installedLookAndFeels) {
            logger.debug("installedLookAndFeel = " + installedLookAndFeel.getClassName());
        }

             try {
                 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                 MainWindow window = new MainWindow();

             } catch (ClassNotFoundException e) {
                 e.printStackTrace();
             } catch (InstantiationException e) {
                 e.printStackTrace();
             } catch (IllegalAccessException e) {
                 e.printStackTrace();
             } catch (UnsupportedLookAndFeelException e) {
                 e.printStackTrace();
             } catch (NoteManagerException e) {
                 e.printStackTrace();
             }
         }
     });

    }
}
